/*
 * 显示时间
 */
function showDateTime(){
    if (!document.all)
        return
    var Digital=new Date();
    var year=Digital.getYear();
    var month=Digital.getMonth()+1;
    var day=Digital.getDate();
    var hours=Digital.getHours();
    var minutes=Digital.getMinutes();
    var seconds=Digital.getSeconds();
    var dn="AM" 
    if (hours>12){
        dn="PM";
        hours=hours-12;
        }
    if (hours==0)
        hours=12;
    if (minutes<=9)
        minutes="0"+minutes;
    if (seconds<=9)
        seconds="0"+seconds;
    var ctime=year+"-"+month+"-"+day+"<br />"+hours+":"+minutes+":"+seconds+" "+dn;
    YMDHMS.innerHTML=ctime;
    setTimeout("showDateTime()",1000);
}
window.onload=showDateTime